Repository navigation
ci(dependabot): 入队前先等必需检查通过(修 #202 的空转) - #207
Merged
Merged
Conversation
#202 让工作流显式调 `enqueuePullRequest`,但它在 PR 创建后 2 秒就跑了,此时 14 项必需 检查一个都没完成,GitHub 直接拒绝: UNPROCESSABLE: Pull request 13 of 14 required status checks have not succeeded 而 `gh pr merge --auto` 在这套 ruleset 上又从不入队(#195 带着 auto-merge、检查全绿仍停 OPEN)。两者叠加的结果和修复前一样 —— #205 / #206 创建后一直停在 CLEAN。 改动: - 删掉只写 autoMergeRequest 的 `gh pr merge --auto`(实测无效,减少误导); - 入队改为「先轮询 mergeStateStatus 直到 CLEAN,再 enqueue」:最多 40 次 × 45s(30 分钟), DIRTY(有冲突)立即告警退出,超时告警并把最后状态写进日志,交给人工; - job 加 timeout-minutes: 60 兜底。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#202 没修彻底
#202 让工作流显式调
enqueuePullRequest,但它在 PR 创建后 2 秒就执行了 —— 此时 14 项必需检查一个都没完成,GitHub 直接拒绝入队:(见 #205 的
Dependabot auto-mergerun 45092946084。)gh pr merge --auto在这套 ruleset 上又从不入队 —— 两者叠加的结果和修复前一模一样:#205 / #206 创建后一直停在CLEAN。根因:
enqueuePullRequest要求必需检查已全部成功,而「检查跑完」这个事件没有任何触发器。改动
gh pr merge --auto --squash:实测只写autoMergeRequest、永不入队(chore(deps): bump taiki-e/install-action from 2.90.2 to 2.90.6 in the github-actions group across 1 directory #195 从 11-16 带 auto-merge、检查全绿仍停 OPEN),留着只会误导;mergeStateStatus,最多 40 次 × 45s(30 分钟);CLEAN→ 调enqueuePullRequest;DIRTY(有冲突)→ 立即::warning::退出,交人工;::warning::带上最后状态退出,绝不静默失败;timeout-minutes: 60兜底。BLOCKED/UNKNOWN/BEHIND都继续等(BEHIND 是 base 前进后需 dependabot 重新 rebase,等它自己动)。验证计划
合入后对 #205 / #206 发
@dependabot rebase触发一次synchronize→ 新 workflow 会在检查跑完后自动入队,无需人工enqueuePullRequest。若日志出现必需检查已全部通过(第 N 次轮询),开始入队+已加入 merge queue:{...state:QUEUED},说明闭环成立。附:分支清理
顺带清掉了本轮遗留的无用分支(本地
dbg-*1 个、fork 上已合入/已关闭 PR 的dependabot/*2 个);origin上只剩 #205 / #206 两条活跃分支。